package com.example.navigation.api.navigation

import com.example.navigation.api.ResponseData
import retrofit2.http.GET
import retrofit2.http.Query

/**
 * Created with IntelliJ IDEA.
 * @Author: Liao Run
 * @Date: 2024-06-10 2:05
 * @Description:
 **/
interface NavigationApi {

    data class SearchNavigationDataParams(
        val beDate: String,
        val endDate: String,
        val deviceId: String,
        val lx: Int
    )

    @GET("/gps/getAllgpsd")
    suspend fun searchNavigationData(
        @Query(value = "bedate") beDate: String,
        @Query(value = "enddate") endDate: String,
        @Query(value = "bq") deviceId: String,
        @Query(value = "lx") type: Int
    ): ResponseData<Lines>
}

enum class PointIndex {
    longitude,
    latitude,
    dustValue,
    address,
    road,
    street
}
// 线段里的点
typealias Point = Array<String>
// 线段，多个线段组成一条线,因为修改每个线段，所以用可变数组，用空间换时间
typealias LineSegment = ArrayList<Point>
// 线的颜色
typealias LineColor = String
typealias Line = Map<LineColor, LineSegment>
typealias Lines = Array<Line>